-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix typo in Github Bearer Token and remove redundant check for ignoring non-yaml files in config.go #1409
Conversation
* Remove redundant check for ignoring non-yaml files in config.go
Hi @mirahmed753. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @wojtek-t |
@@ -407,11 +406,6 @@ func getProwConfig(configPaths []string) (Jobs, error) { | |||
|
|||
for _, configPath := range configPaths { | |||
klog.Infof("Fetching config %s", configPath) | |||
// Perfdash supports only yamls. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you're removing this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't fit into this PR (and this is actually a useful check).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe adding a bearer token breaks the HasSuffix() check here since the downloadURL will look like https://raw.githubusercontent.com/kubernetes/test-infra/master/config/jobs/kubernetes/sig-scalability/sig-scalability-release-blocking-jobs.yaml?token=AXXXXXXXXXXXXXXXXXXXXZ
Isn't this a redundant check since we guarantee yaml files in GetConfigsFromGithub()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't fit into this PR
I can rebase and just push the typo fix if it doesn't fit :D Going to wait for your reply to my prev comment before I do :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK - the explanation makes sense to me and looking into the code it seems to be indeed reduntant.
/ok-to-test |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mirahmed753, wojtek-t The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I was running into an auth issue despite setting my Github token properly. Upon investigation, I found that the request header for auth should look like:
Authorization: Bearer <token>
. In the current code, we have a colon after Bearer leading to my auth issues. Once removed, I was authenticated properly.Unfortunately, this breaks retrieving the prow config because a bearer token adds some extra auth chars after the downloadURL. (e.g:
https://raw.githubusercontent.com/kubernetes/test-infra/master/config/jobs/kubernetes/sig-scalability/sig-scalability-release-blocking-jobs.yaml?token=AXXXXXXXXXXXXXXXXXXXXZ
). In the code:.yaml
, we check if thegithubDirContent.Name
has the suffix.yaml
prior to adding it to our list of config paths inGetConfigsFromGithub()
getProwConfig()
withgithubDirContent.DownloadURL
which fails because the downloadURL adds the auth chars as mentioned aboveIn this PR:
getProwConfig()
since we already guarantee we're working with only yaml files in the first check inGetConfigsFromGithub()